
from time import sleep
from selenium import webdriver


class BasePage(object):


    def __init__(self,driver,url):
        self.driver=driver
        self.url=url

    def locator(self,loc):
        return self.driver.find_element(*loc)

    def open(self):
        self.driver.get(self.url)

    def quit(self):
        sleep(2)
        self.driver.quit()